home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / CUGUK / PC_LIBS / C045.ZIP / BTREE.ARC / GETKEY.H < prev    next >
Text File  |  1989-02-08  |  1KB  |  31 lines

  1. int     nextkey (indexfile * nxp, char * key);
  2.         /*
  3.          *  On entry, nxp points to an indexfile, key points to the
  4.          *  location where the next key will be stored.  Nextkey
  5.          *  returns the record number of the data item associated
  6.          *  with the next key. If the datafile is empty, NULL is returned.
  7.          *  If current record is the largest, then the first record is
  8.          *  returned.
  9.          */
  10. int     prevkey (indexfile *, char *);
  11.         /*
  12.          *  Similar to nextkey.
  13.          */
  14. int     tafindkey (indexfile * nxp, char * key);
  15.         /*
  16.          *  Searches for 'key' of the indexfile to which nxp points.
  17.          *  Returns the record number of the data item if found. Else
  18.          *  returns NULL. Note: will always return NULL is dupsallowed.
  19.          */
  20. int     findkey (indexfile * nxp, char * key);
  21.         /*
  22.          *  Same as tafindkey except it will return the record number
  23.          *  of the first data item found even if dupsallowed.
  24.          */
  25. int     searchkey (indexfile * nxp, char * key);
  26.         /*
  27.          *  Searches for the data item with 'key' in indexfile * nxp.
  28.          *  Returns its pageref if found, or returns the pageref of
  29.          *  the successor of its would-be predecessor.
  30.          */
  31.